﻿@{
    Layout = null;
    List<LeEdu.MODEL.UserInfo> lst = ViewBag.ss;
}

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="acdcccbbbcd0ceb9da02e9cd4c87736eb0033ee4" name="csrf-token" />
    <title>
        用户管理 -
        用户管理 -
        用户
        | EduSoho
    </title>
    <link href="/files/system/2015/06-20/102236c61b61855109.ico?6.9.3" rel="shortcut icon" />
    <script src="~/bootstrap-3.3.5-dist/jquery-2.0.0.min.js"></script>

    <script src="~/bootstrap-3.3.5-dist/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>


    <link href="~/bootstrap-3.3.5-dist/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" />

    <link href="~/Content/css/common.css" rel="stylesheet" />

    <link href="~/Content/css/admin.css" rel="stylesheet" />

    <link href="~/Content/css/admin_v2.css" rel="stylesheet" />

    <link href="~/Content/css/es-icon.css" rel="stylesheet" />




    <!--[if lt IE 9]>
      <script src="js/html5shiv.js?6.9.3"></script>
      <script src="js/respond.min.js?6.9.3"></script>
    <![endif]-->


</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/admin/user">乐知教育管理后台</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">


                    <li class="active">
                        <a href="/admin/user">用户</a>
                    </li>



                    <li>
                        <a href="/Course/Index">课程</a>
                    </li>



                    <li>
                        <a href="/Group/GroupIndex">运营</a>
                    </li>



                    <li>
                        <a href="/admin/course/order/manage">订单</a>
                    </li>



                    <li>
                        <a href="/Trade/finance">账务</a>
                    </li>



                    @*<li>
                        <a href="/admin/app/center">教育云</a>
                    </li>*@

                    <li>
                        <a href="/Log/Index">管理</a>
                    </li>


                </ul>
                <ul class="nav navbar-nav navbar-right">
                    
                    <li><a href="/"><i class="glyphicon glyphicon-home"></i> 回首页</a></li>
                    <li class="dropdown">
                        <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-user"></i> @Session["Uname"] <span class="glyphicon glyphicon-chevron-down"></span></a>
                        <ul class="dropdown-menu main-list">
                            <li><a href="/Login/Index"><i class="glyphicon glyphicon-off"></i> 退出</a></li>
                        </ul>
                    </li>
                </ul>
            </div><!--/.navbar-collapse -->
        </div>
    </div>

    <div class="container">
        <div class="row">

            <div class="col-md-2">

                <div class="list-group">

                    <a class="list-group-item" href="/admin/user">用户管理</a>



                    <a class="list-group-item active" href="/admin/teacher">教师管理</a>



                    <a class="list-group-item" href="/admin/approvals">实名认证管理</a>
                </div>
            </div>
            <div class="col-md-10">
                <div class="page-header clearfix">
                    <h1 class="pull-left">教师管理</h1>
                    <div class="pull-right">

                    </div>
                </div>
                <table id="teacher-table" class="table table-striped table-hover" data-search-form="#user-search-form">
                    <thead>
                        <tr>
                            <th>用户名</th>
                            <th>推荐教师</th>
                            <th>是否审核</th>
                            <th>最近登录</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in lst)
                        {
                            <tr id="user-table-tr-4">
                                <td>
                                    <strong>
                                        @*<a href="#" role="show-user" data-toggle="modal" data-target="#modal" data-url="http://www.zhishile.com/admin/user/4">@item.Uname</a>*@
                                        <a href="/Admin/SingleUser/@item.UserInfoId" data-toggle="modal" data-target="#myModal1">@item.Uname</a>
                                    </strong>
                                </td>
                                <td>
                                    <span class="text-success">@(item.Tisornot == 0 ? "否" : "是")</span>
                                    <br>
                                    <span class="text-muted text-sm">@DateTime.Now</span>
                                </td>
                                <td>
                                    <span class="text-success">@(item.TeacherCheck == 0 ? "未审核" : "已审核")</span>
                                    <br>
                                    <span class="text-muted text-sm">@DateTime.Now</span>
                                </td>
                                <td>
                                    <span class="text-sm">@DateTime.Now</span>
                                    <br>
                                    <a class="text-muted text-sm" href="http://www.baidu.com/s?wd=221.204.14.19" target="_blank">221.204.14.19</a>
                                </td>
                                <td>


                                    <div class="btn-group">
                                        @*<a href="#modal" data-toggle="modal" data-target="#myModal" onclick="showModal(@item.UserInfoId)" data-url="/Admin/Single/@item.UserInfoId" class="btn btn-default btn-sm">查看</a>*@
                                        <a href="/Admin/Show/@item.UserInfoId" data-toggle="modal" data-target="#myModal" class="btn btn-default btn-sm">查看</a>

                                        <a href="#" type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </a>
                                        <ul class="dropdown-menu">

                                            <li><a class="promote-user" href="/Admin/Ed/@item.UserInfoId">@(item.Tisornot == 0 ? "推荐教师" : "取消推荐教师")</a></li>
                                            <li><a class="promote-user" href="/Admin/Cz/@item.UserInfoId" data-target="#exampleModal" data-toggle="modal">是否审核</a></li>

                                        </ul>
                                    </div>
                                </td>
                            </tr>

                        }

                    </tbody>
                </table>
                <!--分页-->
                <div>
                    <a href="/Admin/teacher?PageIndex=1" class="btn btn-primary btn-lg active">首页</a>

                    <a href="/Admin/teacher?PageIndex=@Convert.ToInt32((ViewBag.PageIndex - 1) < 1 ? (1) : (ViewBag.PageIndex - 1))" class="btn btn-default">上一页</a>

                    @for (int i = 1; i <= ViewBag.PageCount; i++)
                    {
                        <a href="/Admin/teacher/?pageIndex=@i" class="btn btn-default">@i</a>
                    }

                    <a href="/Admin/teacher?PageIndex=@Convert.ToInt32((ViewBag.PageIndex + 1) >= ViewBag.PageCount ? (ViewBag.PageCount) : (ViewBag.PageIndex + 1))" class="btn btn-default">下一页</a>

                    <a href="/Admin/teacher?PageIndex=@ViewBag.PageCount" class="btn btn-primary btn-lg active">尾页</a>


                </div>


                <!--分页-->
            </div>
        </div>
    </div>





    @*添加用户信息*@

    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
               

            </div>
        </div>
    </div>


    @*模态框传值问题（加载一次模态框 清楚一下以前的数据  不然数据不变）*@
    <script>
        $("#exampleModal").on("hidden.bs.modal", function () {
            $(this).removeData("bs.modal");
        })
    </script>
    <!--模态框-->
    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">

            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    @*修改用户信息模板页*@

    <div class="modal fade" id="myModalEdit" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">

            </div><!-- /.modal-content -->
        </div>
    </div>
    @*用来设置用户身份的模态框*@
    <div class="modal fade" id="RoleIdModal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">

            </div><!-- /.modal-content -->
        </div>
    </div>


    <!--模态框-->
    <script>
        var app = {};
        app.debug = false;
        app.version = '6.9.3';
        app.httpHost = 'http://www.zhishile.com';
        app.basePath = '';
        app.theme = 'jianmo';
        app.themeGlobalScript = 'theme/global-script';
        app.jsPaths = { "common": "common", "theme": "\/themes\/jianmo\/js", "customwebbundle": "\/bundles\/customweb\/js", "customadminbundle": "\/bundles\/customadmin\/js", "topxiawebbundle": "\/bundles\/topxiaweb\/js", "topxiaadminbundle": "\/bundles\/topxiaadmin\/js", "classroombundle": "\/bundles\/classroom\/js" };

        app.crontab = '/common/crontab';

        var CKEDITOR_BASEPATH = app.basePath + '/assets/libs/ckeditor/4.6.7/';

        app.config = { "api": { "weibo": { "key": "" }, "qq": { "key": "" }, "douban": { "key": "" }, "renren": { "key": "" } }, "cloud": { "video_player": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/GrindPlayer.swf", "video_player_watermark_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Watermake-1.0.3.swf", "video_player_fingerprint_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Fingerprint-1.0.1.swf" }, "loading_img_path": "\/assets\/img\/default\/loading.gif?6.9.3" };

        app.arguments = {};
        app.controller = 'user/teacher-list';

        app.scripts = null;

        app.uploadUrl = '/file/upload';
        app.imgCropUrl = '/file/img/crop';
        app.lessonCopyEnabled = '0';

        app.mainScript = '/bundles/topxiaadmin/js/admin-app.js?6.9.3';
    </script>
    <script src="/assets/libs/seajs/seajs/2.2.1/sea.js?6.9.3"></script>
    <script src="/assets/libs/seajs/seajs-style/1.0.2/seajs-style.js?6.9.3"></script>
    <script src="/assets/libs/seajs-global-config.js?6.9.3"></script>
    <script>
        seajs.use(app.mainScript);
    </script> 
    <script>
    function ChangeSealState(obj)//封禁操作
    {
        $.post("/Admin/ChangSealState", { id: obj }, function (data) {

            if (data == 1) {
                alert("封禁成功");
                window.location.href = '/Admin/User';
            }
            if (data == 0) {
                alert("解除禁止");

                window.location.href = '/Admin/User';
            }

        })

    }
    </script>
 <div id="modal" class="modal"></div>
    <div class="fixed-bar">
        <a href="/admin/feedback" target="_blank" class="icon-question-text feedback">
            <i class="es-icon es-icon-help"></i>
            <span>产品<br>反馈</span>
        </a>
    </div>


</body>

</html>
